package net.user.action;

import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.user.db.member.MemberDAO;

public class MemberZipcodeAction implements Action{
	public ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception{
		
		System.out.println("net.user.action.MemberZipcodeAction.execute()");
		
		request.setCharacterEncoding("euc-kr");
		ActionForward forward=new ActionForward();
		MemberDAO memberdao=new MemberDAO();
		List zipcodeList=new ArrayList();
		
		String searchdong=request.getParameter("dong");
		zipcodeList=memberdao.searchZipcode(searchdong);
		
		request.setAttribute("zipcodelist", zipcodeList);
		forward.setRedirect(false);
		forward.setPath("/user/member/zipcode.jsp"); 
		return forward;
	}
}